package com.woniuxy.enums;

/**
 * 异常响应消息枚举类
 */
public enum CodeEnum {

    UNLOGIN_FAIL(405, "未登录"),
    LOGIN_FAIL(200111, "对不起，您已经被管理员禁止登录！"),
    LOGIN_FAIL_JURISDICTION(403, "没有权限"),
    CODE_NULL_FAIL(10002, "没有填写验证码"),
    SEND_CODE_NULL_FAIL(10003, "没有发送验证码"),
    CODE_ERROR(10003, "没有发送验证码"),
    CODE_ERROR_PHONE(10001, "输入的手机号码与信息中的不符合"),
    MENU_ERROR_SIZE(10100, "菜单查找有问题"),
    ROLE_NULL(10302, "角色不存在"),
    ROLE_ERROR_FIND(10306, "角色查找有问题"),
    ROLE_UPDATE_FAIL(10400, "修改角色失败"),
    ROLE_SAVE_FAIL(10305, "添加新角色失败"),
    ROLE_SAVE_FAIL_DUPLICATE_NAME(10304, "角色添加失败，改角色名已经存在"),
    ROLE_DELETE_FAIL(10301, "删除角色失败"),
    ROLE_DELETE_FAIL_1(10303, "角色删除失败,请检查勾选数据"),
    USER_UPDATE_FAIL(10400, "修改用户失败"),
    USER_SAVE_FAIL(10401, "添加新用户失败"),
    USER_SAVE_FAIL_PHONE(10406, "该电话已被注册，请更换电话"),
    USER_SAVE_FAIL_ACCOUNT(10405, "该账号已被注册，请更换账号"),
    SER_UPDATE_FAIL_1(10407, "不能修改他人账号"),
    USER_NULL(10403, "账号不存在"),
    USER_DELETE_FAIL_1(10408, "用户删除失败，请检查勾选数据"),
    EMPOWER_FAIL(10200, "授权失败,请检查数据"),
    SHOP_FALL(10601, "门店不存在"),
    PARAMETER_ERROR(999, "参数错误"),
    BRAND_ADD_FAIL(10801, "品牌信息已存在，新增失败"),
    BRAND_UPDATE_NOWAY(10805, "该品牌信息无法修改"),
    BRAND_UPDATE_FAIL(10806, "品牌修改失败"),
    BRAND_INFO_NULL(10802, "品牌信息不存在"),
    BRAND_DELETE_NOWAY(10810, "有品牌不满足删除条件"),
    SMALLER_ADD_FAIL(10701, "三级类信息已存在，新增失败"),
    SMALLER_UPDATE_NOWAY(10705, "该三级类信息无法修改"),
    SMALLER_UPDATE_FAIL(10706, "三级类修改失败"),
    SMALLER_INFO_NULL(10702, "三级类信息不存在"),
    SMALLER_DELETE_NOWAY(10710, "有三类不满足删除条件"),
    SMALL_ADD_FAIL(10601, "小类信息已存在，新增失败"),
    SMALL_UPDATE_NOWAY(10605, "该小类信息无法修改"),
    SMALL_UPDATE_FAIL(10606, "小类修改失败"),
    SMALL_INFO_NULL(10602, "小类信息不存在"),
    SMALL_DELETE_NOWAY(10610, "有小类不满足删除条件"),
    GENERAL_ADD_FAIL(10501, "大类信息已存在，新增失败"),
    GENERAL_UPDATE_NOWAY(10505, "该大类信息无法修改"),
    GENERAL_UPDATE_FAIL(10506, "大类修改失败"),
    GENERAL_INFO_NULL(10502, "大类信息不存在"),
    GOODS_PROP_NULL(10700, "暂无属性，请先添加数据"),
    GOODS_SAVE_FAIL(10699, "添加失败，一个属性组只能唯一属性，多选，单选，各一个"),
    GOODS_UPDATE_FAIL(10698, "添加失败，一个属性组只能唯一属性，多选，单选，各一个"),
    GOODS_PROP_UPDATE_FAIL(10701, "商品属性修改失败"),
    GOODS_PROP_SAVE_FAIL(10702, "商品属性添加失败"),
    GOODS_PROP_GROUP_SAVE_FAIL_1(10703, "属性组添加失败,勾选数量和数据量商品小类对不上"),
    GOODS_PROP_GROUP_SAVE_FAIL_2(10715, "属性组添加失败,一个三级类只能有一个属性组"),
    GOODS_PROP_GROUP_UPDATE_FAIL_1(10704, "属性组修改失败,商品小类id错误"),
    GOODS_PROP_GROUP_UPDATE_FAIL_2(10705, "属性组修改失败"),
    GOODS_PROP_GROUP_DELETE_FAIL_1(10706, "属性组删除失败，请检查勾选数据"),
    GOODS_PROP_GROUP_DELETE_FAIL(10707, "属性组删除失败"),
    GOODS_PROP_DELETE_FAIL_1(10716, "商品删除失败，请检查勾选数据"),
    GOODS_EVALUATION_DELETE_FAIL_1(10702, "商品评估删除失败，请检查勾选数据,查询数据是否存在或者已经删除"),
    GOODS_EVALUATION_DELETE_FAIL(10703, "商品评估删除失败"),
    GOODS_EVALUATION_SAVE_FAIL(10704, "商品评估添加失败"),
    GOODS_EVALUATION_SAVE_FAIL_1(10705, "添加失败,评估信息已存在"),
    DISTRIBUTOR_DELETE_FAIL_1(10706, "渠道商删除失败,该渠道商不存在"),
    DISTRIBUTOR_DELETE_FAIL_2(10707, "渠道商删除失败,该渠道商已删除"),
    DISTRIBUTOR_DELETE_FAIL_3(10708, "渠道商删除失败"),
    DISTRIBUTOR_UPDATE_FAIL(10709, "渠道商修改失败"),
    DISTRIBUTOR_SAVE_FAIL_1(10709, "渠道商添加失败,姓名不能为空"),
    DISTRIBUTOR_SAVE_FAIL_2(10710, "渠道商添加失败,手机不能为空"),
    DISTRIBUTOR_SAVE_FAIL_3(10711, "渠道商添加失败,状态不能为空"),
    DISTRIBUTOR_SAVE_FAIL_4(10712, "渠道商添加失败,渠道商已存在不用重复添加"),
    DISTRIBUTOR_SAVE_FAIL_5(10713, "渠道商添加失败"),
    DISTRIBUTOR_FIND_FAIL(10714, "该渠道商不存在"),
    SHOP_SAVE_FAIL(10800, "门店添加失败"),
    SHOP_UPDATE_FAIL(10801, "门店修改失败"),
    SHOP_DELETE_FAIL(10802, "门店删除失败"),
    SHOP_SELECT_FAIL(10803, "门店查询失败"),
    PAWN_SHOW_SAVE_FAIL(10804, "仓库存储失败"),
    PAWN_SHOW_SAVE_FAIL_1(10805, "仓库存储失败,参数有误"),
    PAWN_DELETE_FAIL_1(10805, "门店删除失败,门店不存在"),
    PAWN_DELETE_FAIL_2(10805, "门店删除失败,门店已经删除"),
    PAWN_SAVE_FAIL(10806, "门店存储失败"),
    WAREHOUSE_SAVE_FAIL_1(10806, "仓库存储失败,仓库已存在"),
    WAREHOUSE_UPDATE_FAIL_1(10807, "仓库更新失败"),
    WAREHOUSE_DELETE_FAIL_1(10809, "仓库删除失败"),
    WAREHOUSE_SAVE_FAIL(10808, "仓库更新失败"),
    WAREHOUSE_DELETE_FAIL_2(10809, "仓库不存在"),
    WAREHOUSE_DELETE_FAIL_3(10810, "仓库已删除"),
    GENERAL_DELETE_NOWAY(10510, "有大类不满足删除条件"),
    APPRAISAL_SAVE_FAIL_5(10721, "添加鉴定记录失败"),
    APPRAISAL_SAVE_FAIL_1(10720, "鉴定记录已存在不用重复添加"),
    COMMODITY_DELETE_FAIL_1(10722, "商品删除失败"),
    COMMODITY_DELETE_FAIL_2(10723, "用户删除失败，请检查勾选数据"),

    Evaluate_SAVE_FAIL_1(10730, "添加评估记录失败");
    private final Integer code;
    private final String message;

    CodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }
}
